# GNU Make 3.81
CXX = g++
lib = -L/usr/local/lib -lgif
out = viewgcm
obj = main.o
testfile = test

.PHONY: all
all: $(obj)
	g++ $(obj) -o $(out) $(lib)

.PHONY: test
test: $(out)
	./$(out) $(testfile).gif
	convert $(testfile)-cm.ppm $(testfile)-cm.png

.PHONY: clean
clean:
	$(RM) $(obj) $(out).exe $(out).exe.*

.SUFFIXES: .o .c
.c.o:
	$(CXX) -c $<
